<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

<ui:define name="head">
    <script type="text/javascript">
        function doPopupWindow(obj) {
             var pkid = obj.parentNode.parentNode.parentNode.getAttribute("data-rk");
             var popupwindow = window.open("common/cutpayDetlFields.xhtml?pkid=" + pkid, "", "height=600,width=800,left=200,top=100,toolbar=no,menubar=no,scrollbars=yes,location=no");
             popupwindow.focus;
         }
    </script>
</ui:define>

<ui:define name="content">
<div style="margin:5px">

<p:tabView dynamic="true" cache="false" style="font-weight:normal;font-style:normal">
<p:tab title="SBS入帐处理">
    <div id="table">
        <h:form id="form">
            <p:messages id="msgs" showDetail="false"/>
            <p:menubar>
                <p:menuitem type="push" value="全部入帐" icon="ui-icon ui-icon-document"
                            action="#{sbsAccountAction.onAccountAll}" update="msgs, pdt"/>
                <p:menuitem type="push" value="多笔入帐" icon="ui-icon ui-icon-disk"
                            action="#{sbsAccountAction.onAccountMulti}" update="msgs, pdt"/>
            </p:menubar>
            <p:ajaxStatus style="height:18px;text-align:center">
                <f:facet name="start">
                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value=""/>
                </f:facet>
            </p:ajaxStatus>
            <p:dataTable id="pdt" dynamic="true"
                         style="width:100%;"
                         value="#{sbsAccountAction.detlList}" var="record"
                         rowKey="#{record.pkid}"
                         selection="#{sbsAccountAction.selectedRecords}"
                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} 【总笔数:#{sbsAccountAction.totalcount}】【总金额:#{sbsAccountAction.totalamt}】"
                         paginator="true" rows="15" paginatorPosition="bottom"
                         rowsPerPageTemplate="100,50,30,15,5"
                         emptyMessage="数据记录为空...">
                <p:column selectionMode="multiple" style="width:18px"/>
                <ui:include src="common/cutpayListFields.xhtml">
                     <ui:param name="backBean" value="#{sbsAccountAction}" />
                </ui:include>
            </p:dataTable>
        </h:form>
    </div>
</p:tab>
<p:tab title="SBS入帐成功记录清单">
    <div id="succListTable">
        <h:form id="succListform">
            <p:dataTable id="succpdt" dynamic="true"    style="width:100%;"
                         value="#{sbsAccountAction.successDetlList}" var="record"
                         rowKey="#{record.pkid}"
                         selection="#{sbsAccountAction.selectedRecord}"
                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} 【总笔数:#{sbsAccountAction.totalSuccessCount}】【总金额:#{sbsAccountAction.totalSuccessAmt}】"
                         paginator="true" rows="15" paginatorPosition="bottom"
                         rowsPerPageTemplate="100,50,30,15,5"
                         emptyMessage="数据记录为空...">
                <p:column selectionMode="multiple"  style="width:18px"/>
                <ui:include src="common/cutpayListFields.xhtml">
                     <ui:param name="backBean" value="#{sbsAccountAction}" />
                </ui:include>
            </p:dataTable>
        </h:form>
    </div>

</p:tab>
</p:tabView>
</div>

</ui:define>

</ui:composition>